package com.changpay.zywy.mvp.presenter

import com.changpay.zywy.base.BasePresenter
import com.changpay.zywy.ext.ss
import com.changpay.zywy.mvp.contract.MessageContract
import com.changpay.zywy.mvp.model.MessageModel


/**
 * Created by chenxz on 2018/5/27.
 */
class MessagePresenter : BasePresenter<MessageContract.Model, MessageContract.View>(), MessageContract.Presenter {
    override fun getTixianMessage(map: MutableMap<String, String>) {
        mModel?.getTixianMessage(map)?.ss(mModel, mView) {
            mView?.showTixanMessage(it.result)
        }
    }

    override fun getAwardMessage(map: MutableMap<String, String>) {
        mModel?.getAwardMessage(map)?.ss(mModel, mView) {
            mView?.showAwardMessage(it.result)
        }
    }

    override fun getSystemMessage(map: MutableMap<String, String>) {
        mModel?.getSystemMessage(map)?.ss(mModel, mView) {
            mView?.showSystemMessage(it.result)
        }
    }


    override fun createModel(): MessageContract.Model? = MessageModel()

}